import request from '@/utils/request'

// 查询省赛管理员列表
export function listProvincial(query) {
  return request({
    url: '/work/adminSheng/list',
    method: 'get',
    params: query
  })
}

// 查询省赛管理员详细
export function getProvincial(userId) {
  return request({
    url: '/work/adminSheng/' + userId,
    method: 'get'
  })
}

// 新增省赛管理员
export function addProvincial(data) {
  return request({
    url: '/work/adminSheng/saveOrUpdate',
    method: 'post',
    data: data
  })
}

// 修改省赛管理员
export function updateProvincial(data) {
  return request({
    url: '/work/adminSheng/saveOrUpdate',
    method: 'post',
    data: data
  })
}

// 删除省赛管理员
export function delProvincial(userId) {
  return request({
    url: '/work/adminSheng/delete-by-id',
    method: 'get',
    params:{"userId":userId}
  })
}

export function delUsers(userIds) {
  const data = {
    "userIds":userIds
  }
  return request({
    url: '/work/adminSheng/delete-by-ids',
    method: 'get',
    params: data
  })
}

export function changeUserStatus(userId,status) {
  const data = {
    "userId": userId,
    "status": status
  }
  return request({
    url: "/work/adminSheng/change-status",
    method: 'get',
    params: data
  })
}